const express = require('express');
const router = express.Router();
const { D_ICPMS, D_otopes } = require('../../models');
const { where, Op } = require('sequelize');
const yjyview = require('../../models/yjyview');


router.post('/UPbWetherill', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const UPbWetherill = await D_ICPMS.findAll({
            attributes: ['U_Th_Pb_207Pb_235U_measured', 'U_Th_Pb_1SE', "U_Th_Pb_206Pb_238Umeasured", "U_Th_Pb_206Pb_238Umeasured_1SE", "rho"],
            //limit: 400,
            where: {
                U_Th_Pb_207Pb_235U_measured: {
                    [Op.ne]: null,
                },
                // U_Th_Pb_1SE:{
                //     [Op.ne]: null,
                // },
                U_Th_Pb_206Pb_238Umeasured: {
                    [Op.ne]: null,
                },
                // U_Th_Pb_206Pb_238Umeasured_1SE:{
                //     [Op.ne]: null,
                // }
                rho: {
                    [Op.ne]: null,
                },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        res.json(
            {
                status: true,
                message: 'UPbWetherill查询成功！',
                data: {
                    UPbWetherill
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/UPbWetherill', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        // const sampleIDsString = sampleIDs.map(item => item).join(',');
        console.log(req.body);
        console.log(sampleIDs);
        const UPbWetherill = await D_ICPMS.findAll({
            attributes: ['U_Th_Pb_207Pb_235U_measured', 'U_Th_Pb_1SE', "U_Th_Pb_206Pb_238Umeasured", "U_Th_Pb_206Pb_238Umeasured_1SE", "rho"],
            //limit: 400,
            where: {
                U_Th_Pb_207Pb_235U_measured: {
                    [Op.ne]: null,
                },
                // U_Th_Pb_1SE:{
                //     [Op.ne]: null,
                // },
                U_Th_Pb_206Pb_238Umeasured: {
                    [Op.ne]: null,
                },
                // U_Th_Pb_206Pb_238Umeasured_1SE:{
                //     [Op.ne]: null,
                // }
                rho: {
                    [Op.ne]: null,
                },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        if (true) {
            res.json({
                status: true,
                message: 'UPbWetherill查询成功！',
                data: req.body
            })
        }
        else {
            res.status(404).json(
                {
                    status: false,
                    message: "数据获取失败！",
                    errors: [error.message]
                }
            )
        }
    }
    catch (error) {
        res.status(500).json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }

}

)

router.post('/UPbTeraWasserburg', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const UPbTeraWasserburg = await D_ICPMS.findAll({
            attributes: ['D_238U_206Pb_measured', 'D_238U_206Pb_measured_1SE', "D_207Pb_206Pb_measured", "D_207Pb_206Pb_measured_1SE"],
            //limit: 400,
            where: {
                D_238U_206Pb_measured: {
                    [Op.ne]: null,
                },
                // D_238U_206Pb_measured_1SE:{
                //     [Op.ne]: null,
                // },
                D_207Pb_206Pb_measured: {
                    [Op.ne]: null,
                },
                // D_207Pb_206Pb_measured_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        res.json(
            {
                status: true,
                message: 'UPbTeraWasserburg查询成功！',
                data: {
                    UPbTeraWasserburg
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/PbPb', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const PbPb = await D_otopes.findAll({
            attributes: ['Pb_206Pb_204Pb', 'Pb_206Pb_204Pb_1SE', "Pb_207Pb_204Pb", "Pb_207Pb_204Pb_1SE"],
            //limit: 400,
            where: {
                Pb_206Pb_204Pb: {
                    [Op.ne]: null,
                },
                // Pb_206Pb_204Pb_1SE:{
                //     [Op.ne]: null,
                // },
                Pb_207Pb_204Pb: {
                    [Op.ne]: null,
                },
                // Pb_207Pb_204Pb_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        res.json(
            {
                status: true,
                message: 'PbPb查询成功！',
                data: {
                    PbPb
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/RbSr', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const RbSr = await D_otopes.findAll({
            attributes: ['Rb_87Rb_86Sr', 'Rb_87Rb_86Sr_1SE', "Rb_87Sr_86Sr", "Rb_87Sr_86Sr_1SE"],
            //limit: 400,
            where: {
                Rb_87Rb_86Sr: {
                    [Op.ne]: null,
                },
                // Rb_87Rb_86Sr_1SE:{
                //     [Op.ne]: null,
                // },
                Rb_87Sr_86Sr: {
                    [Op.ne]: null,
                },
                // Rb_87Sr_86Sr_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'RbSr查询成功！',
                data: {
                    RbSr
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/SmNd', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const SmNd = await D_otopes.findAll({
            attributes: ['Sm_147Sm_144Nd', 'Sm_147Sm_144Nd_1SE', "Sm_143Nd_144Nd", "Sm_143Nd_144Nd_1SE"],
            //limit: 400,
            where: {
                Sm_147Sm_144Nd: {
                    [Op.ne]: null,
                },
                // Sm_147Sm_144Nd_1SE:{
                //     [Op.ne]: null,
                // },
                Sm_143Nd_144Nd: {
                    [Op.ne]: null,
                },
                // Sm_143Nd_144Nd_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'SmNd查询成功！',
                data: {
                    SmNd
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/ReOs', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const ReOs = await D_otopes.findAll({
            attributes: ['Re_187Re_188Os', 'Re_187Re_188Os_1SE', "Re_187Os_188Os", "Re_187Os_188Os_1SE"],
            //limit: 400,
            where: {
                Re_187Re_188Os: {
                    [Op.ne]: null,
                },
                // Re_187Re_188Os_1SE:{
                //     [Op.ne]: null,
                // },
                Re_187Os_188Os: {
                    [Op.ne]: null,
                },
                // Re_187Os_188Os_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'ReOs查询成功！',
                data: {
                    ReOs
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/LuHf', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const LuHf = await D_otopes.findAll({
            attributes: ['Lu_176Lu_177Hf', 'Lu_176Lu_177Hf_1SE', "Lu_176Hf_177Hf", "Lu_176Hf_177Hf_1SE"],
            //limit: 400,
            where: {
                Lu_176Lu_177Hf: {
                    [Op.ne]: null,
                },
                // Lu_176Lu_177Hf_1SE:{
                //     [Op.ne]: null,
                // },
                Lu_176Hf_177Hf: {
                    [Op.ne]: null,
                },
                // Lu_176Hf_177Hf_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'LuHf查询成功！',
                data: {
                    LuHf
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/UThHe', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const UThHe = await D_ICPMS.findAll({
            attributes: ['D_4He', 'D_4He_1SE', "D_238U", "D_238U_1SE", "D_232Th", "D_232Th_1SE"],
            //limit: 400,
            where: {
                D_4He: {
                    [Op.ne]: null,
                },
                // D_4He_1SE:{
                //     [Op.ne]: null,
                // },
                D_238U: {
                    [Op.ne]: null,
                },
                // D_238U_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'UThHe查询成功！',
                data: {
                    UThHe
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/ArAr', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const ArAr = await D_ICPMS.findAll({
            attributes: ['D_40Ar_39Ar_measured', 'D_40Ar_39Ar_measured_1SE', "D_36Ar_39Ar", "D_36Ar_39Ar_1SE"],
            //limit: 400,
            where: {
                D_40Ar_39Ar_measured: {
                    [Op.ne]: null,
                },
                // D_40Ar_39Ar_measured_1SE:{
                //     [Op.ne]: null,
                // },
                D_36Ar_39Ar: {
                    [Op.ne]: null,
                },
                // D_36Ar_39Ar_1SE:{
                //     [Op.ne]: null,
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'ArAr查询成功！',
                data: {
                    ArAr
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/detritals', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const detritals = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age', 'D_207Pb_206Pb_age'],
            //limit: 400,
            where: {
                D_206Pb_238U_age: {
                    [Op.ne]: null,
                },
                D_207Pb_206Pb_age: {
                    [Op.ne]: null,
                },
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        // 创建一个新数组来存储结果  
        let groupedDetritals = [];

        // 使用Map来跟踪每个Sample_ID的信息  
        let map = new Map();

        detritals.forEach(item => {
            // 如果Sample_ID尚未在Map中，则添加它  
            if (!map.has(item.Sample_ID)) {
                map.set(item.Sample_ID, {
                    Sample_ID: item.Sample_ID,
                    Sample_Name: item.Sample_Name, // 可以选择只存储第一个或特殊处理  
                    ages: []
                });
            }
            // 将年龄添加到对应Sample_ID的数组中  
            map.get(item.Sample_ID).ages.push(item.D_207Pb_206Pb_age);
        });

        // 将Map的值（即我们的新对象）转换回数组  
        groupedDetritals = Array.from(map.values());

        // 输出结果以查看  
        console.log(groupedDetritals);
        res.json(
            {
                status: true,
                message: 'detritals查询成功！',
                data: {
                    groupedDetritals
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/detritals6876', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const detritals = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age', 'D_207Pb_206Pb_age'],
            //limit: 400,
            where: {
                D_206Pb_238U_age: {
                    [Op.ne]: null,
                },
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });
        let processedDetritals = detritals.map(item => {
            // 根据条件选择年龄值  
            let selectedAge = item.D_206Pb_238U_age <= 1000 ? item.D_206Pb_238U_age : item.D_207Pb_206Pb_age;

            // 返回原始对象的副本，但添加了一个Selected_Age字段  
            return {
                Sample_ID: item.Sample_ID, // 使用展开运算符复制所有属性  
                Sample_Name: item.Sample_Name,
                Selected_Age: selectedAge // 添加新属性  
            };
        });
        res.json(
            {
                status: true,
                message: 'detritals6876查询成功！',
                data: {
                    processedDetritals
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/detritals68', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const detritals = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age'],
            //limit: 400,
            where: {
                D_206Pb_238U_age: {
                    [Op.ne]: null,
                },
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'detritals68查询成功！',
                data: {
                    detritals
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/detritals76', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const detritals = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_207Pb_206Pb_age'],
            //limit: 400,
            where: {
                D_207Pb_206Pb_age: {
                    [Op.ne]: null,
                },
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'detritals76查询成功！',
                data: {
                    detritals
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/detritals82', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const detritals = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_208Pb_232Th_age'],
            //limit: 400,
            where: {
                D_208Pb_232Th_age: {
                    [Op.ne]: null,
                },
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'detritals82查询成功！',
                data: {
                    detritals
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherweighted76', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherweighted = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_207Pb_206Pb_age', 'D_207Pb_206Pb_age_1SE'],
            //limit: 400,
            where: {
                D_207Pb_206Pb_age: {
                    [Op.ne]: null,
                },
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }

            },
        });

        res.json(
            {
                status: true,
                message: 'otherweighted76查询成功！',
                data: {
                    otherweighted
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherweighted68', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherweighted = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age', 'D_206Pb_238U_age_1SE'],
            //limit: 400,
            where: {
                D_207Pb_206Pb_age: {
                    [Op.ne]: null,
                },
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }

            },
        });

        res.json(
            {
                status: true,
                message: 'otherweighted68查询成功！',
                data: {
                    otherweighted
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherweighted82', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherweighted = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_208Pb_232Th_age', 'D_208Pb_232Th_age_1SE'],
            //limit: 400,
            where: {
                D_208Pb_232Th_age: {
                    [Op.ne]: null,
                },
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'otherweighted82查询成功！',
                data: {
                    otherweighted
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherKDE6876', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherKDE = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age', 'D_207Pb_206Pb_age'],
            //limit: 400,
            where: {
                D_206Pb_238U_age: {
                    [Op.ne]: null,
                },
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // },
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        let processeotherKDE = otherKDE.map(item => {
            // 根据条件选择年龄值  
            let selectedAge = item.D_206Pb_238U_age <= 1000 ? item.D_206Pb_238U_age : item.D_207Pb_206Pb_age;

            // 返回原始对象的副本，但添加了一个Selected_Age字段  
            return {
                Sample_ID: item.Sample_ID, // 使用展开运算符复制所有属性  
                Sample_Name: item.Sample_Name,
                Selected_Age: selectedAge // 添加新属性  
            };
        });

        res.json(
            {
                status: true,
                message: 'otherKDE6876查询成功！',
                data: {
                    processeotherKDE
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherKDE68', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherKDE = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_206Pb_238U_age'],
            //limit: 400,
            where: {
                D_206Pb_238U_age: {
                    [Op.ne]: null,
                }
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // }
                ,
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'otherKDE68查询成功！',
                data: {
                    otherKDE
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherKDE76', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherKDE = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_207Pb_206Pb_age'],
            //limit: 400,
            where: {
                D_207Pb_206Pb_age: {
                    [Op.ne]: null,
                }
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // }
                ,
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'otherKDE76查询成功！',
                data: {
                    otherKDE
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/otherKDE82', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const otherKDE = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', 'D_208Pb_232Th_age'],
            //limit: 400,
            where: {
                D_208Pb_232Th_age: {
                    [Op.ne]: null,
                }
                // ,
                // Sample_ID: {
                //     [Op.in]: ["201011", "201010", "201009", "201008", "2066083", "2030477", "2020187", "2020169", "2020178", "315665"]
                // }
                ,
                Sample_ID: {
                    [Op.in]: sampleIDs
                }
            },
        });

        res.json(
            {
                status: true,
                message: 'otherKDE82查询成功！',
                data: {
                    otherKDE
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

router.post('/yjyview', async function (req, res) {
    try {
        const { sampleIDs } = req.body;
        const yjyview = await yjyview.findAll({
            limit: 400
        });
        res.json(
            {
                status: true,
                message: 'yjyview查询成功！',
                data: {
                    yjyview
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

module.exports = router;